Page({
  onShow() {
    this.getUserInfo()
  },
  async getUserInfo() {
    const { data: userInfo, code } = await wx.http.get('/userInfo')
    if (code !== 10000) return wx.utils.toast()
    this.setData({ userInfo })
    wx.setStorageSync('userInfo', userInfo)
  },
})
